<<<<<<< HEAD
import {GET_INIT_LIST,CHANGE_INPUT_VALUE,ADD_TODO_ITEM,REMOVE_TODO_ITEM,INIT_LIST_ACTION} from './actionTypes'
import axios from 'axios'

export const getInputChangeAction = (inputValue)=>({
    type:CHANGE_INPUT_VALUE,
    inputValue
})

export const getAddTodoItemAction = ()=>({
    type:ADD_TODO_ITEM
})

export const getRemoveTodoItemAction = (index)=>({
    type:REMOVE_TODO_ITEM,
    index
})

export const initListAction = (data)=>({
    type:INIT_LIST_ACTION,
    data
})

export const getInitList = ()=>({
    type:GET_INIT_LIST
})

/* export const getTodoList = ()=>{
    return (dispatch)=>{
        axios.get('/api/list.json')
        .then((res)=>{
            const data = res.data;
            const action = initListAction(data)
            dispatch(action)
           console.log(data)
            const action = initListAction(data);
            console.log(action)
            store.dispatch(action) 
        }).catch(()=>{
            console.log('error')
        })
    }
} */
=======
>>>>>>> react-redux
